<?php

$config = [
    'components' => [
        'request' => [
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            'cookieValidationKey' => '',
        ],
    ],
];

// Framework default value: !YII_ENV_TEST
if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
        //关闭mini-toolbar
        'checkAccessCallback' => function ($action) { return !!$action; },
        'disableCallbackRestrictionWarning' => true,
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'generators' => [
            //构建器控制器
            'builderController' => ['class' => 'console\gii\controller\Generator'],
        ],
    ];
}

return $config;
